{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "37ffab037b1847aaa7db0a1c2894b734",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Plot(antialias=True, axes=['x', 'y', 'z'], axes_helper=1.0, axes_helper_colors=[16711680, 65280, 255], backgro…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "\"\"\"Shrink the triangulation of a mesh to make the inside visible.\"\"\"\n",
    "from vedo import *\n",
    "\n",
    "settings.default_backend = 'k3d' # or k3d, 2d or vtk\n",
    "\n",
    "pot = Mesh(dataurl+\"teapot.vtk\").shrink(0.75)\n",
    "s = Sphere(r=0.2).pos(0, 0, -0.5)\n",
    "show(pot, s, axes=1, bg=\"gray1\", viewup='z')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<tr>\n",
       "<td>\n",
       "<img src=''></img>\n",
       "</td>\n",
       "<td style='text-align: center; vertical-align: center;'><br/>\n",
       "<b><a href=\"https://vedo.embl.es/docs/vedo/mesh.html\" target=\"_blank\">vedo.mesh.Mesh</a></b><br/><code><i>(...bl.es/examples/data/teapot.vtk)</i></code>\n",
       "<table>\n",
       "<tr><td><b> bounds </b> <br/> (x/y/z) </td><td>-1.505 ... 1.664<br/>-0.9845 ... 0.9843<br/>-0.8471 ... 0.7045</td></tr>\n",
       "<tr><td><b> center of mass </b></td><td>(-8.90e-3, -1.19e-4, 3.90e-3)</td></tr>\n",
       "<tr><td><b> average size </b></td><td>0.960</td></tr>\n",
       "<tr><td><b> nr. points&nbsp/&nbspfaces </b></td><td>18960&nbsp/&nbsp6320</td></tr>\n",
       "\n",
       "\n",
       "</table>\n",
       "</table>"
      ],
      "text/plain": [
       "<Mesh(0x1fd9e10) at 0x7fa2a6733880>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
